1. Field of the Invention
The present invention is directed to computer systems; and more particularly, it is directed to the rendering of anti-aliased artwork using computer systems.
2. Description of the Related Art
As the power and complexity of personal computer systems increase, graphics operations are increasingly being performed by dedicated graphics rendering devices referred to as graphics processing units (GPUs). As used herein, the terms “graphics processing unit” and “graphics processor” are used interchangeably. GPUs are often used in removable graphics cards that are coupled to a motherboard via a standardized bus (e.g., AGP or PCI Express). GPUs may also be used in game consoles and in integrated graphics solutions (e.g., for use in some portable computers and lower-cost desktop computers). Although GPUs vary in their capabilities, they may typically be used to perform such tasks as rendering of two-dimensional (2D) graphical data, rendering of three-dimensional (3D) graphical data, accelerated rendering of graphical user interface (GUI) display elements, and digital video playback. A GPU may implement one or more application programmer interfaces (APIs) that permit programmers to invoke the functionality of the GPU.
A GPU may include various built-in and configurable structures for rendering digital images to an imaging device. Digital images may include raster graphics, vector graphics, or a combination thereof. Raster graphics data (also referred to herein as bitmaps) may be stored and manipulated as a grid of individual picture elements called pixels. A bitmap may be characterized by its width and height in pixels and also by the number of bits per pixel. Commonly, a color bitmap defined in the RGB (red, green blue) color space may comprise between one and eight bits per pixel for each of the red, green, and blue channels. An alpha channel may be used to store additional data such as per-pixel transparency values.
Vector graphics data may be stored and manipulated as one or more geometric objects built with geometric primitives. The geometric primitives (e.g., points, lines, polygons, Bézier curves, and text characters) may be based upon mathematical equations to represent parts of digital images. The geometric objects may typically be located in two-dimensional or three-dimensional space. To render vector graphics on raster-based imaging devices (e.g., most display devices and printers), the geometric objects are typically converted to raster graphics data in a process called rasterization.
To reduce demands on central processing units (CPUs) of computer systems, GPUs may be tasked with performing operations that would otherwise contribute to the CPU load. Accordingly, modern GPUs are typically implemented with specialized features for efficient performance of common graphics operations. For example, a GPU often includes a plurality of execution channels that can be used simultaneously. A GPU may also include dedicated structures or built-in program instructions for anti-aliasing rendered objects. Anti-aliasing is any technique for minimizing the jagged, pixilated, or “aliased” edges of objects. Typically, aliasing occurs on objects with non-orthogonal edges, and anti-aliasing may be used to provide a smoother appearance for those edges on a display screen, printed document, or other image rendered on a raster-based imaging device.
One approach for performing anti-aliasing using a GPU includes rendering the artwork to an off-screen buffer (e.g., a multi-sampling image buffer) that is larger than the final displayed image on the target imaging device. The super-sampled image may include a set of samples, each with its own color and alpha values, to represent each pixel at the display resolution. The super-sampled image may then be reduced in size (e.g., using appropriate filtering or averaging of neighboring samples) to generate an anti-aliased image in the screen buffer at the display resolution. Typically, the super-sampled image is larger than the final image by a power of 2. Another approach for performing anti-aliasing using a GPU includes rendering the image several times, slightly “jittering” the camera each time, and averaging the resulting images to generate an anti-aliased image in the screen buffer. The jittering approach typically requires the allocation of multiple off-screen color buffers and depth buffers in the GPU memory (e.g., one color buffer and depth buffer per sample) for storage of the individual jittered images.
Both the super-sampling technique and the jittering technique may consume an extensive amount of the GPU's built-in memory, bandwidth, and other resources. Therefore, the number of samples available in an anti-aliasing operation using these approaches may be limited by the amount of GPU memory. It may be desirable to perform anti-aliasing with more samples per pixel than are available using the super-sampling technique or the jittering technique on a typical GPU.